﻿using System.Collections.Generic;

namespace RoMBot.Classes
{
    public class PlayerUserData
    {
        private readonly Dictionary<string, object> userData = new Dictionary<string, object>();

        public object this[string key]
        {
            get { return userData.ContainsKey( key ) ? userData[ key ] : null; }
            set
            {
                if ( userData.ContainsKey( key ) )
                {
                    userData[ key ] = value;
                }
                else
                {
                    userData.Add( key, value );
                }
            }
        }
    }
}
